package com.example.day7.Model;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.widget.Toast;

import com.example.day7.View.PageActivity;

public class MyReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        String title = intent.getStringExtra("title");
        String pic = intent.getStringExtra("pic");

        Toast.makeText(context, title, Toast.LENGTH_SHORT).show();

        Intent intent1 = new Intent(context, PageActivity.class);
        intent1.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        context.startActivity(intent1);


    }
}
